package com.xrui.hbasecmd.export;


import com.xrui.hbasecmd.data.DataRow;
import com.xrui.hbasecmd.data.TypedColumn;

import java.io.IOException;

/**
 * An exporter interface to be used to export data from the table.
 */
public interface Exporter {

    /**
     * Writes a list of rows into the output stream.
     *
     * @param row     A row to write.
     * @param columns A list of columns in the specified order which values to be written.
     */
    void write(DataRow row, Iterable<TypedColumn> columns) throws IOException;

    /**
     * Writes a list of rows into the output stream.
     *
     * @param row     A row to write.
     */
    void write(DataRow row) throws IOException;
}
